<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ page import="java.math.BigDecimal" %>
<%@ page import="org.springframework.context.ApplicationContext"%>
<%@ page import="org.springframework.context.support.ClassPathXmlApplicationContext"%>
<%@ page import="com.gopay.common.Result"%>
<%@ page import="com.gopay.common.domain.bank.BaseMessage"%>
<%@ page import="com.gopay.remote.bank.BankInteractRemoteService"%>

<% 
	try{
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        BankInteractRemoteService bankInteractService = (BankInteractRemoteService) context.getBean("bankInteractService");
		BaseMessage base = new BaseMessage();
       // base.setOrderId("2013052903283782");
        base.setOrderId("2013091622503435");
        base.setAmount(new BigDecimal("0.01"));
        base.setBank("HXBC");
		Result result = (Result) bankInteractService.pay(base);
	    out.println("<h2>ok!!!<h2>"); 
	}catch(Exception e){
			out.println(e); 
	}
%>